#ifndef SPEEDTEST_H
#define SPEEDTEST_H

#include <QMainWindow>
#include <qtimer.h>
#include <QtGui>
#include "highscores.h"

namespace Ui {
    class SpeedTest;
}

class SpeedTest : public QMainWindow {
    Q_OBJECT
public:
    SpeedTest(QWidget *parent = 0);
    ~SpeedTest();
    QTimer timer;
    void gameOver();
    void newGame();

protected:
    void changeEvent(QEvent *e);
    void paintEvent ( QPaintEvent *e );
    void mouseReleaseEvent ( QMouseEvent *e );
    void showEvent ( QShowEvent * event );
    void updateNappi();


private slots:
    void on_buttonExit_clicked();
    void on_pushButton_clicked();
    void timerHandle();

private:
    Ui::SpeedTest *ui;
    QImage taustaImage;
    bool bNappi[4];
    bool bNappiActive;
    int score;
    float delay;
    bool bGameOn;
    int nappiLast;
    QList<int> nappiNext;
    QColor color_on[4], color_off[4];
    HighScores highScores;


};

#endif // SPEEDTEST_H
